dp = {}
str = input("请输入一串字符串:")
for i in str:
    dp[i] = dp.get(i, 0) + 1
    items = list(dp.items())
    # items.sort(key=lambda x:x[1],reverse=True)
    # print(items)
zm,number=0,0
for i in items:
    if i[0].isalpha():
        zm+=i[1]
    elif i[0].isalnum():
        number+=i[1]
print("字母出现的次数{}，数字出现的次数{}".format(zm,number))

print(dp)
# print(items)


